package com.dmagic.cms.common.util;

import java.util.HashMap;
import java.util.Map;

import com.google.common.collect.Maps;

public class CacheUtil {

    public static Map<String, Object> CACHE_MAP = Maps.newHashMap();

    /**
     * @description :Access to cache the corresponding key value of
     * @param key
     * @return 
     */
    public static Object getCacheMap(String key) {
        return CACHE_MAP.get(key);
    }

    /**
     * @description :Corresponding key value set cache
     * @param key -key
     * @param object -value
     * @return
     */
    public static HashMap<String, Object> setCacheMap(String key, Object object) {
        CACHE_MAP.put(key, object);
        return (HashMap<String, Object>) CACHE_MAP;
    }
}
